﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Permission.Models;

namespace Microhard.Permission_MembershipImpl
{
    internal class RoleCompare : IComparer<Role>
    {

        #region IComparer<Role> Members

        public int Compare(Role x, Role y)
        {
            if (x == null)
                throw new Exception("缺少x参数");
            if (y == null)
                throw new Exception("缺少y参数");
            if (x.RoleId == y.RoleId)
                return 0;
            return 1;
        }

        #endregion
    }
}
